<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class WxcardPrerogative extends Model
{
    public $table='wxcard_prerogative';

    public $primaryKey='id_wxcard_prerogative';

    public $timestamps = false;

    public function mcard()
    {
        return $this->belongsTo(Mcard::class,'id_mcard','id_mcard')->where('is_del','N');
    }

    public function prerogative()
    {
        return $this->hasOne(Prerogative::class,'id_prerogative','id_prerogative');
    }
}
